package com;

import lombok.Data;

import javax.validation.constraints.*;

@Data
public class User {
    private Integer id;

    @NotEmpty(message = "用户名不能为空！")
    private String name;

    @NotNull(message = "用户年龄为必填项！")
    private String age;

    @Min(1)
    @Max(2)
    private Integer sex;

    @Email
    private String email;
}
